jQuery(function() {
    if (jQuery('.package-status-change-action').length > 0) {
        jQuery('.package-status-change-action').bind('click', function() {
            var oid = jQuery(this).attr('package_name');
            var status = jQuery(this).attr('status');
            var text = '';
            if (status == 1) {
                text = 'Change status Package "' + oid + '" to Invoice Sent ?';
            }
            if (status == 3) {
                text = 'Change status Package "' + oid + '" to Shipped ?';
            }
            if (text != '') {
                if (confirm(text)) {
                    window.location.href = jQuery(this).attr('href');
                }
            }
            return false;
        });
    }
});